<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<h:head>
	<title><h:outputText value="#{msgs.datos_alumno}" /></title>
</h:head>
<h:body>
	<f:view locale="es">
		<h:form>
			<h3><h:outputText value="#{msgs.datos_alumno}" /></h3>
			<h3>Modo <h:outputText value="#{alumnosView.useCaseMode}" /></h3>
			<rich:panel>
				<h:panelGrid columns="2">
					<h:column>
						<h:outputText value="#{msgs.nombre}" />
					</h:column>
					<h:column>
						<h:outputText id="nombreAlumno"
							value="#{alumnosView.alumno.nombre}"
							rendered="#{alumnosView.modoConsulta and alumnosView.modoEliminar}" />
						<h:inputText value="#{alumnosView.alumno.nombre}"
							rendered="#{alumnosView.modoNuevo and alumnosView.modoModificar}"
							required="true" />
						<f:converter for="nombreAlumno" converterId="StringConverter" />
					</h:column>
					<h:column>
						<h:outputText value="#{msgs.apellido}" />
					</h:column>
					<h:column>
						<h:outputText id="apellidoAlumno"
							value="#{alumnosView.alumno.apellido}"
							rendered="#{alumnosView.modoConsulta and alumnosView.modoEliminar}" />
						<h:inputText value="#{alumnosView.alumno.apellido}"
							rendered="#{alumnosView.modoNuevo and alumnosView.modoModificar}"
							required="true">
						</h:inputText>
					</h:column>

					<h:column>
						<h:outputText value="#{msgs.email}" />
					</h:column>
					<h:column>
						<h:outputText value="#{alumnosView.alumno.email}"
							rendered="#{alumnosView.modoConsulta and alumnosView.modoEliminar}" />
						<h:inputText value="#{alumnosView.alumno.email}"
							rendered="#{alumnosView.modoNuevo and alumnosView.modoModificar}"
							required="true" />
					</h:column>

					<h:column>
						<h:outputText value="#{msgs.telefono}:" />
					</h:column>
					<h:column>
						<h:outputText value="#{alumnosView.alumno.telefono}"
							rendered="#{alumnosView.modoConsulta and alumnosView.modoEliminar}" />
						<h:inputText value="#{alumnosView.alumno.telefono}"
							rendered="#{alumnosView.modoNuevo and alumnosView.modoModificar}"
							required="true" />
					</h:column>
				</h:panelGrid>
			</rich:panel>
			<h:commandButton action="#{alumnosListener.guardarAlumno}"
				value="Guardar" rendered="#{alumnosView.modoNuevo}" />
			<h:commandButton action="#{alumnosListener.modificarAlumno}"
				value="Guardar" rendered="#{alumnosView.modoModificacion}" />
			<h:commandButton action="#{alumnosListener.eliminarAlumno}"
				value="Eliminar" rendered="#{alumnosView.modoEliminacion}" />
			<h:commandButton action="#{alumnosListener.volver}" value="Volver"
				immediate="true" />
			<h:commandButton action="#{alumnosListener.salir}" value="Salir"
				immediate="true" />
			<!--			<rich:dataTable var="alu" value="#{alumnosView.lstAlumnos}"-->
			<!--				rendered="#{alumnosView.modoNuevo}" border="1">-->
			<!--				<f:facet name="header">-->
			<!--					<h:panelGrid columns="5">-->
			<!--						<rich:column>-->
			<!--							<h:outputText value="ID" />-->
			<!--						</rich:column>-->
			<!--						<rich:column>-->
			<!--							<h:outputText value="NOMBRE" />-->
			<!--						</rich:column>-->
			<!--						<rich:column>-->
			<!--							<h:outputText value="APELLIDO" />-->
			<!--						</rich:column>-->
			<!--						<rich:column>-->
			<!--							<h:outputText value="EMAIL" />-->
			<!--						</rich:column>-->
			<!--						<rich:column>-->
			<!--							<h:outputText value="TELEFONO" />-->
			<!--						</rich:column>-->
			<!--					</h:panelGrid>-->
			<!--				</f:facet>-->
			<!--				<rich:column>-->
			<!--					<h:outputText value="#{alu.id}" />-->
			<!--				</rich:column>-->
			<!--				<rich:column>-->
			<!--					<h:outputText value="#{alu.nombre}" />-->
			<!--				</rich:column>-->
			<!--				<rich:column>-->
			<!--					<h:outputText value="#{alu.apellido}" />-->
			<!--				</rich:column>-->
			<!--				<rich:column>-->
			<!--					<h:outputText value="#{alu.email}" />-->
			<!--				</rich:column>-->
			<!--				<rich:column>-->
			<!--					<h:outputText value="#{alu.telefono}" />-->
			<!--				</rich:column>-->
			<!--			</rich:dataTable>-->
		</h:form>
	</f:view>
</h:body>
</html>